<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8" />
		<title></title>
		<style type="text/css">
			.content {
				width: 200px;
				height: 200px;
				background: skyblue;
			}
			.fade-enter-active, .fade-leave-active {
			  transition: opacity 5s;
			}
			.fade-enter, .fade-leave-to /* .fade-leave-active below version 2.1.8 */ {
			  opacity: 0;
			}
			
			
			.slide-enter-active, .slide-leave-active {
			  transition: all 5s;
			}
			.slide-enter, .slide-leave-to /* .fade-leave-active below version 2.1.8 */ {
			  transform: translateX(500px);
			  opacity: 0;
			}
		</style>
		<script src="js/vue.js" type="text/javascript" charset="utf-8"></script>
	</head>
	<body>
		<div id="app">
			<!-- 属性name会跟后期框架追加的类名一致 -->
			<transition name="slide">
				<div v-if="isShow" class="content">

				</div>
			</transition>

			<button type="button" @click="change">切换内容</button>
		</div>

		<script type="text/javascript">
			var app = new Vue({
				el: "#app",
				data: {
					isShow: true,
				},
				methods: {
					change: function() {
						this.isShow = !this.isShow;
					}
				}
			})
		</script>
	</body>
</html>
